// agreement.ts
import axios from 'axios';

// 协议列表-分页
export const getAgreementList = (page: number, size: number) => {
  return axios.post('/agreement/getList', { page, size });
};

// 协议删除
export const deleteAgreement = (id: number) => {
  return axios.post('/agreement/delete', { id });
};

// 协议详情
export const getAgreementDetail = (id: number) => {
  return axios.get('/agreement/getDetail', { params: { id } });
};

// 新建/修改协议
export const saveAgreement = (data: {
  id?: number;
  title: string;
  content: string;
  status: number;
}) => {
  return axios.post('/agreement/saveAgreement', data);
};
// 协议操作日志
export const getAgreementLogList = async (data: any) => {
  console.log(12313123)
  const res = await axios.post('/agreement/getLogList',data);
  console.log(res.data.list,'---list')
  return {
    data: res.data.list,
    total: res.data.total,
    success: true
  }
};